-- GENERATED SPELL FOR [Razorfen Geomancer] --


function spell0_4520(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4520', 3000, 1)
end

function spell1_4520(pUnit, Event) --@Summon Earth Rumbler,Self--
pUnit:FullCastSpellOnTarget(8270,pUnit)
pUnit:RegisterEvent('Sorts_4520', 582, 1)
end

function Sorts_4520(pUnit, Event)
local choix_sorts_4520 = math.random(0, 1)
if choix_sorts_4520 == 0 then
pUnit:RegisterEvent('spell0_4520', 1, 1)
end
if choix_sorts_4520 == 1 then
pUnit:RegisterEvent('spell1_4520', 1, 1)
end
end

function mob4520_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4520', math.random(1500, 3000), 1)
end

function mob4520_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4520_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4520_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4520, 1, 'mob4520_Action')
RegisterUnitEvent(4520, 2, 'mob4520_Leave')
RegisterUnitEvent(4520, 3, 'mob4520_Kill')
RegisterUnitEvent(4520, 4, 'mob4520_Die')
